<script setup>
    import { reactive } from 'vue';
    import { useRouter } from 'vue-router';

    const router = useRouter();
    const pageMap = reactive([
        { path: '/', name: '首页' },
        { path: '/order', name: 'Home' }
    ]);

    function onJump({ path }) {
        console.log(path, '点击');
        router.push({
            path: path
        });
    }
</script>

<template>
    <h4>mes首页</h4>
    <ul>
        <li
            v-for="item in pageMap"
            :key="item.path"
            @click="onJump(item)"
        >
            <a>{{ item.name }}</a>
        </li>
    </ul>
</template>

<style scoped>

</style>
